<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Events</title>
        <script type="text/javascript">
          function clickButton() {
              alert("Hi");
              alert("Bi");
          }
        </script>
    </head>
    <body>
        <form name="forma1" method="post" enctype="text/plain">
            <input id="i1"/>
            <br/>
            <input id="i2"/>
            <br/>
            <button type="button" id="b1">Button</button>
        </form>
        <script type="text/javascript">
          var gumb = document.getElementById("b1");
          gumb.onclick = clickButton;
        </script>
    </body>
</html>